package com.azt.novel.home.controller;



import com.azt.novel.common.resp.RestResp;
import com.azt.novel.home.resp.HomeBookRespDto;
import com.azt.novel.home.service.IHomeBookService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 小说推荐 前端控制器
 * </p>
 *
 * @author azt
 * @since 2023-12-02
 */
@RestController
//@Controller
@RequestMapping("/api/front/home")
public class HomeBookController {
    @Resource
    private IHomeBookService iHomeBookService;



    @Operation(summary = "首页小说推荐查询接口")
    @GetMapping("/books")
//    @ResponseBody
    public RestResp<List<HomeBookRespDto>> listHomeBooks(){
        return iHomeBookService.listHomeBooks();
    }

}
